package c.c.b.a.b.a.c;

import c.c.b.a.b.a.e.d;
import c.c.b.a.b.a.e.g;
import c.c.b.a.b.c;
import c.c.b.a.b.c0;
import c.c.b.a.b.x;
import c.c.b.a.b.z;
import java.io.IOException;
import java.util.Objects;

/* compiled from: ConnectInterceptor */
public final class a implements x {
    public final z a;

    public a(z zVar) {
        this.a = zVar;
    }

    public c a(c.c.b.a.b.x.a aVar) throws IOException {
        g gVar = (g) aVar;
        c0 c0Var = gVar.f;
        g gVar2 = gVar.b;
        int equals = c0Var.b.equals("GET") ^ 1;
        z zVar = this.a;
        Objects.requireNonNull(gVar2);
        try {
            d c = gVar2.b(gVar.i, gVar.j, gVar.k, zVar.v, equals).c(zVar, aVar, gVar2);
            synchronized (gVar2.d) {
                gVar2.m = c;
            }
            return gVar.b(c0Var, gVar2, c, gVar2.g());
        } catch (IOException e) {
            throw new e(e);
        }
    }
}
